// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import FastClick from 'fastclick';
import App from './App';
import router from './router/router';
import store from './store/';
import './utils/rem';
import * as filters from './filters';
// import authorize from './authorize';

if ('addEventListener' in document) {
  document.addEventListener('DOMContentLoaded', () => { FastClick.attach(document.body); }, false);
}

Vue.config.productionTip = false;
Vue.config.debug = true;

Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));

/* eslint-disable no-new */

// authorize()

//   .then((token) => {
//     // store.commit('get_token', token);
//     // store.commit('dingding_ready', true);
//     /* eslint-disable */
//     console.log(234);
//     /* eslint-enable */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App },
});
//   })
//   .catch(err => console.log(err));
